<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!--/*@thymesVar id="room" type="com.treasure.mall.biz.entity.live.LiveRoomPO"*/-->
<div th:fragment="roomDetailFg" class="ibox-title" style="vertical-align: bottom;height: 100%;padding-left: 0;"
     th:object="${room}">
    <input type="hidden" id="hdRoomId" th:value="*{id}"/>
    <h5 style="font-size: 18px;">
        <img th:src="${@resourceService.get(room.data.logo).getURI()}"
             src="../../resource/img/p2.jpg"
             th:onerror="|this.src='@{/resource/img/d_head.jpeg}'|"
             onerror="this.src='../../resource/img/d_head.jpeg'"
             alt="" style="width:100px;height:100px;border-radius: 10px">
    </h5>
    <div style="margin-left: 120px;width: 50%;margin-top: -6px;">
        <h3 th:text="*{data.title}">剑南的直播间</h3>
        <p style="width: 373px;height: 51px;" th:text="*{data.description}">
            非常优秀的直播间非常优秀的直播间非常优秀的直播间非常优秀的直播间非常优秀的直播间非常优秀的直播间非常优秀的直播间</p>
        <p>创建时间：<span th:text="*{createTime}">2012-12-12 12:12:12</span></p>
    </div>
    <!--    <button type="button" id="sendMessage"-->
    <!--            style="float: right;margin-top: -45px;margin-right: 100px;"-->
    <!--            class="btn btn-primary btn-xl m-b-none">消息回复-->
    <!--    </button>-->
    <button type="button" id="editBtn"
            style="float: right;margin-top: -45px;margin-right: 10px;"
            class="btn btn-primary btn-xl m-b-none">房间设置
    </button>

    <button type="button" id="editNoticeBtn"
            style="float: right;margin-top: -45px;margin-right: 100px;"
            class="btn btn-success btn-xl m-b-none">发布客服通知
    </button>


    <script type="text/javascript" th:inline="javascript">
        const editUri = /*[[@{/live/edit}]]*/  "";
        const sendMessageUri = /*[[@{/live/sendGeneralMessage}]]*/  "";
    </script>
    <script type="text/javascript">
        $(function () {
            $("#editBtn").click(function () {
                hot.iframeModal(editUri + "?roomId=" + $("#hdRoomId").val(), "1000px", window.innerHeight * 0.95 + "px", '编辑');
            });

            $("#editNoticeBtn").click(function () {
                hot.iframeModal(editUri + "/notice?roomId=" + $("#hdRoomId").val(), "460px", "350px", '发布客服通知');
            });

        });
    </script>
</div>
</body>
</html>